package com.molin.threadTest.threadVolatileTest.Demo2;

import java.util.concurrent.atomic.AtomicInteger;

public class Meigui extends Thread{
    private AtomicInteger count=new AtomicInteger();

    @Override
    public void run() {
        while (count.get()<10000){
            int sum=count.incrementAndGet();
        System.out.println("送你第"+sum+"朵玫瑰花");
        }
    }
}
